import 'package:boss/models/commission.dart';
import 'package:boss/textStyle/text_style.dart';
import 'package:boss/ui/widget/custom_list_title.dart';
import 'package:boss/ui/widget/image/base_image.dart';
import 'package:hi_common/hi_common.dart';
import 'package:flutter/material.dart';

class CommissionItem extends StatelessWidget {
  final VoidCallback onTap;
  final Commission data;

  const CommissionItem({
    Key key,
    this.onTap,
    this.data,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: EdgeInsets.symmetric(
        horizontal: 30.w,
      ),
      child: CustomListTitle(
        title: RichText(
          text: TextSpan(text: data.commissionName, style: TextStyleConstant().normal_1_28, children: [
//                  if (data.type == 1)
//                  TextSpan(
//                    text: data.leftDayText,
//                    style: TextStyleConstant().normal_3_28,
//                  ),
          ]),
        ),
        trailing: BaseImage(
          'assets/image/arrow_right_icon.png',
          width: 13.w,
          height: 30.w,
        ),
        onTap: onTap,
      ),
    );
  }
}
